<!--引入公共的模板-->
{{extend './layout.html'}}
{{block 'content'}}
<!-- 搜索 -->
<div class="container mt-5">
  <div class="row">
    <!-- 搜索课程 -->
    {{ if search.length !== 0}}
      {{ each search }}
        <div class="col-sm-12 col-md-12 col-lg-3 col-xl-3 mb-5">
          <a href = "/detail?id={{$value.article_id }}">
            <div class="card shadow">
              <img src="{{ $value.thumb }}"  class="card-img-top" alt="{{ $index }}" style="height: 180px;">
              <div class="card-body">
                <h5 class="card-title"> {{ $value.title }} </h5>
                <p class="card-text" style="overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;"> {{ $value.intro }} </p>
              </div>
            </div>
          </a>
        </div> 
      {{ /each }}
    {{ else }}
    <div class="col-12">
      <h2 class="text-center" style="padding: 100px 0;">您搜索的文章没有找到......</h2>
    </div>
    {{ /if }}
  </div>
</div>

{{/block}}